package book;

public class BookList {
    private Book[] books;//书架

    private static   final int booksLen = 10;//书架空间
    private int booksSizeof;//书架所存放书的数量

    public BookList() {
        books = new Book[booksLen];
        books[0] = new Book("水浒传","罗贯中",98,"小说");
        books[1] = new Book("java语言程序设计","张宏升",49,"学习资料");
        books[2] = new Book("西游记","曹雪芹",64,"小说");
        booksSizeof = 3;
    }


    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public  int getBooksLen() {
        return booksLen;
    }

    public  int getBooksSizeof() {
        return booksSizeof;
    }

    public  void setBooksSizeof(int booksSizeof) {
        this.booksSizeof = booksSizeof;
    }
    public Book getBook(int operta) {
        return books[operta];
    }
    public void setBook(int operta,Book book) {
        this.books[operta] = book;
    }
}
